package com.yuanchu.goods.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.goods.dao.YoshopUploadFileDao;
import com.yuanchu.goods.entity.YoshopUploadFileEntity;
import com.yuanchu.goods.service.YoshopUploadFileService;
import org.springframework.stereotype.Service;

import static com.yuanchu.goods.utils.FormatUtils.formatFile;


@Service("yoshopUploadFileService")
public class YoshopUploadFileServiceImpl extends ServiceImpl<YoshopUploadFileDao, YoshopUploadFileEntity> implements YoshopUploadFileService {



    @Override
    public YoshopUploadFileEntity getUploadFileById(Integer imageId) {
        YoshopUploadFileEntity file = this.getById(imageId);
        if (file == null){
            return null;
        }
        return formatFile(file);
    }



}